package com.commerce.common.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("order_items")
public class OrderItem {

  @TableId(type = IdType.AUTO)
  private Long id;

  @TableField("order_id")
  private Long orderId;

  @TableField("product_id")
  private Long productId;

  @TableField("product_name")
  private String productName;

  @TableField("product_image")
  private String productImage;

  private Double price;
  private Integer quantity;

  @TableField("total_price")
  private Double totalPrice;

  @TableField("create_time")
  private LocalDateTime createTime;

}
